# This file is part of BlackArch Linux ( http://blackarch.org ).
# See COPYING for license details.

pkgname=h8mail
pkgver=344.ee31c8f
_pyver=3.13
pkgrel=10
pkgdesc='Email OSINT and password breach hunting.'
arch=('any')
groups=('blackarch' 'blackarch-recon' 'blackarch-social')
url='https://github.com/khast3x/h8mail'
license=('custom:unknown')
depends=('python' 'python-requests')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/khast3x/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md

  rm -rf "$pkgdir/usr/lib/python$_pyver/site-packages/tests"
}

